home *** CD-ROM | disk | FTP | other *** search
- AppLogger.dll version 1.1.5 Copyright 1999 Craig Gill
-
- This .dll is an ole in-process .dll or activex .dll. It's functions perform
- application log file logging as well as various other useful functions that
- you can enhance your projects with.
-
- Revision History:
-
- 05/29/1999 AppLogger.dll version 1.1.5
- --------------------------------------
- -AppLogger.dll is no longer freeware and now requires registration.
- * Register this software at Regnow.com: https://www.regnow.com/softsell/nph-softsell.cgi?item=2305-1
- Registration entitles you to free technical support via email and free
- upgrades to the product for one (1) major version.
- -AppLogger.dll now includes a great error handling product:
- VB Debug Workshop by Rodrigo Rodriguez http://www.gateway-cs.net/rrdn/
- -AppLogger.AddToRecentDocuments method now correctly working.
-
-
- 05/07/1999 AppLogger.dll version 1.1.4
- --------------------------------------
- -This .dll is now compiled with Visual Basic 6.0 Service Pack 2.
- -Added .CopyFiles method that can copy a single file or a file specification using
- Windows api's. Returns "0" if the method fails, otherwise it returns the number of
- files copied.
-
-
- 04/15/1999 AppLogger.dll version 1.1.3
- --------------------------------------
- -Made AppLogger.dll fully Year 2000 compliant.
- -It is now compiled with Visual Basic 6.0 Service Pack 1.
- -AppLogger.dll now calculates free drive space correctly on FAT16 and FAT32 formatted drives.
- -*applogger.AddToRecentDocuments is a method still being tested but should not cause any problems
- should you decide to use it.
- -Added .INI_ReadINT method to read integers from .ini files. Returns "0" if no integer found.
-
-
- 11/02/1997 AppLogger.dll version 1.1.2
- --------------------------------------
- -Fixed a path problem with the .LogFileName and .INI_PathToINI properties. Those properties now
- work whether you specify them as C:\APP-PATH\WHATEVER.LOG or WHATEVER.LOG, WHATEVER.LOG assumes
- the current directory path.
- -Fixed .DiskFreeSpace property to return the free drive space whether the .LogFileName property is
- set or not. If it is not set, it return's the free drive space on the C: drive.
- -Improved various error handler routines.
- -Recompiled the .dll with Instancing set to GlobalMultiUse, therefore you do not need the dim applog as applog or set applog=new applog
- lines in your project, it is now globaly available and exposes to events (which are not functional yet).
- -Changed the name of the .INI_Path property to .INI_PathToINI.
-
-
- File Specific's:
- AppLogger.dll 184k 05/29/1999 05:41am CST
-
-
- Exported Methods,Properties, and Events
- ---------------------------------------
-
- Methods:
- .AddToRecentDocuments - Adds a file specification to the Windows Recent documents list or clears all entries.
- .CopyFiles - Copies a single file or a file specification. Returns num of files copied.
- .DeleteLogFile - Deletes the current file that is in the .LogFileName property
- .EndLogFileEvents - Perform's the last write to the log file indicating what time logging has been stopped
- .WriteEventToLogFile - Perform's a write to the log file in the .LogFileName property
- .DeleteToRecycleBin - Deletes a file to the RecycleBin, returns TRUE if successful
- .DiskFreeSpace - Calculates free disk space on the drive that contains the log file, returns a long number
- .INI_ReadINT - Reads an integer from a private .ini file. Returns "0" if no integer found.
- .INI_ReadString - Reads a string from a private .ini file
- .INI_WriteString - Writes a string to a private .ini file, if the named one does not exist then it will be created
- .StripPath - Returns the filename from a full file path
-
- Properties:
- .DoesLogFileExist - (Boolean) Return's a boolean answer if the .LogFileName file exists
- .LogFileName - (String) Sets the current file name to be used for the log file, specify the filename in the full path
- .MaximumLogFileSize - (LONG) Sets the maximum size the log file can get in bytes, but represented in the app as a LONG number
- .OverwriteLogFile - (Boolean) Tell's AppLogger.dll that it can overwrite the current log file
- .SizeOfCurrentLogFile - (LONG) Returns the current size of the log file in bytes, but represented in the application as a LONG number
- .INI_PathToINI - (String) Sets the current .ini file, specify the filename in the full path
-
- Events:
- .ErrorWritingToLogFile - Will be implemented in a future version, does not effect funtionality of the current version.
- .SuccessfulWriteToLogFile - Will be implemented in a future version, does not effect funtionality of the current version.
-
-
- Here's is some basic code to help get you started using the .dll:
-
- Installation Instructions:
- You must first register the .dll by typing regsvr32 AppLogger.dll at the DOS prompt in the directory that AppLogger.dll will reside, or
- you can run the included batch file Register_Control.bat.
- Then in the VB5/6 IDE you must click Project, Components, and check-mark AppLogger.
-
- ____________________________________________________
- Option Explicit
-
-
- Private Sub Form_Load()
-
- Dim result As Long
- Dim ds
-
- applogger.AddToRecentDocuments ("c:\temp\somefile.txt") 'Adds a file to Start, Documents
- result = applogger.CopyFiles("C:\temp\", "C:\newdir\", "*.txt") 'Returns num of files copied
- applogger.LogFileName = "c:\temp\testLogFilename.log" 'Or you can specify as "testlogfilename.log"
- applogger.INI_Path = "c:\temp\testfile.ini" 'Or you can specify as "testfile.ini"
- applogger.MaximumLogFileSize = 300000 'Maximum size can be is 2meg or 2000000 in LONG notation
- applogger.WriteEventToLogFile ("This is test1") 'Writes something to the log file
- result = applogger.INI_WriteString("TestSection2", "TestKey2", "This is a test") 'Returns LONG value, 0 if unsuccessful
- MsgBox applogger.INI_ReadString("TestSection2", "TestKey2")
- MsgBox applogger.StripPath("C:\temp\testfile.ini")
- ds = Format$(applogger.DiskFreeSpace, "###,###,###,##0")
- MsgBox ds
-
- End Sub
-
- Private Sub DeleteFile_Click()
- Dim x As String
- Dim result As Boolean
- x = applogger.LogFileName
- result = applogger.DeleteToRecycleBin(x) 'Deletes a file to the RecycleBin with NO confirmation
- MsgBox result
- End Sub
-
- Private Sub Form_Terminate()
- applogger.EndLogFileEvents
- End Sub
- _____________________________________________________
-
-
- Sample Output:
-
- _____________________________________________________
- AppLogger Logfile started 6:29:47 PM 04/15/1999
-
- 04/15/1999 6:29:47 PM - test1
- 04/19/1999 6:00:29 PM - test1
- 04/19/1999 6:02:08 PM - test1
- _____________________________________________________
-
- * Note #1: AppLogger does check for free drive space anytime a write to disk operation is performed
- and if your free drive space is LESS than the property .MaximumLogFileSize then you will get a warning
- but the operation will still continue unless you have 0 drive space free then in that case it returns the
- warning + an error. .MaximumLogFileSize's default value is 30000 or 30k if you do not specify it's value.
-
- * Note #2: This activex .dll was created using VB6 with Service Pack 2.
-
-
- Since this is just version 1.1.5 of the .dll I plan to add more functionality
- to the AppLogger.dll and more help to this readme.txt file.
-
-
- You can contact me directly for help or bug reports or to just comment on it:
- craig_gill@email.com